{extend name="base"/}

{block name="box"}
<div class="layui-container fly-marginTop fly-user-main">
    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
        <li class="layui-nav-item">
            <a href="{{:url('User/home')}}">
                <i class="layui-icon">&#xe609;</i>
                我的主页
            </a>
        </li>
        <li class="layui-nav-item layui-this">
            <a href="{{:url('User/userCenter')}}">
                <i class="layui-icon">&#xe612;</i>
                用户中心
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="{{:url('User/set')}}">
                <i class="layui-icon">&#xe620;</i>
                基本设置
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="{{:url('User/message')}}">
                <i class="layui-icon">&#xe611;</i>
                我的消息
            </a>
        </li>
    </ul>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>


    <div class="fly-panel fly-panel-user" pad20>
        <!--
        <div class="fly-msg" style="margin-top: 15px;">
          您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
        </div>
        -->
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title" id="LAY_mine">
                {eq name="$action" value="send"}
                <li data-type="mine-jie" lay-id="index" class="layui-this">我发的帖（<span>{{$sendCardNum}}</span>）</li>
                <li data-type="collection" data-url="/collection/find/" lay-id="collection">我收藏的帖（<span>{{$collectCardNum}}</span>）</li>
                {else/}
                <li data-type="mine-jie" lay-id="index" >我发的帖（<span>{{$sendCardNum}}</span>）</li>
                <li data-type="collection" data-url="/collection/find/" lay-id="collection" class="layui-this">我收藏的帖（<span>{{$collectCardNum}}</span>）</li>
                {/eq}
            </ul>
            <div class="layui-tab-content" style="padding: 20px 0;">
                <!--我发表的帖子-->
                <div class="layui-tab-item layui-show">
                    <ul class="mine-view jie-row">
                        {if condition="!empty($sendCardList)"}
                            {foreach name="sendCardList" item="val"}
                                <li>
                            <a class="jie-title" href="{{:url('Card/cardBrowse',['id'=>$val.id])}}">{{$val.name}}</a>
                            <i>{{$val.create_time}}</i>
                            <em>&nbsp;{{$val.browse}}&nbsp;阅&nbsp;/&nbsp;{{$val.evaluate_num}}&nbsp;答&nbsp;/&nbsp;{{$val.collect_num}}&nbsp;收藏&nbsp;</em>
                        </li>
                            {/foreach}

                        <!--分页显示-->
                        {{$sendCardPage}}
                        {else/}
                            <div class="fly-none">您暂时没有发表任何帖子</div>
                        {/if}


                    </ul>
                    <div id="LAY_page"></div>
                </div>
                <!--我收藏的帖子-->
                <div class="layui-tab-item">
                    <ul class="mine-view jie-row">
                        {if condition="!empty($collectCardList)"}
                            {foreach name="collectCardList" item="val"}
                                <li>
                                    <a class="jie-title" href="{{:url('Card/cardBrowse',['id'=>$val.card_id])}}">{{$val.name}}</a>
                                    <i>收藏于{{$val.create_time}}</i>
                                </li>
                        {/foreach}
                        <!--分页显示-->
                        {{$collectCardPage}}
                        {else/}
                            <div class="fly-none">您暂时没有收藏任何帖子</div>
                        {/if}

                    </ul>
                    <div id="LAY_page1"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="fly-footer">
    <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
    <p>
        <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
        <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
        <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
    </p>
</div>
{/block}